import request from '@/utils/request'

// 查询员工证书子列表
export function listCertificate(query) {
  return request({
    url: '/hrm/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询员工证书子详细
export function getCertificate(certId) {
  return request({
    url: '/hrm/certificate/' + certId,
    method: 'get'
  })
}

// 新增员工证书子
export function addCertificate(data) {
  return request({
    url: '/hrm/certificate',
    method: 'post',
    data: data
  })
}

// 修改员工证书子
export function updateCertificate(data) {
  return request({
    url: '/hrm/certificate',
    method: 'put',
    data: data
  })
}

// 删除员工证书子
export function delCertificate(certId) {
  return request({
    url: '/hrm/certificate/' + certId,
    method: 'delete'
  })
}

// 根据员工ID查询证书列表
export function getCertificatesByEmpId(empId) {
  return request({
    url: '/hrm/certificate/listByEmpId/' + empId,
    method: 'get'
  });
}
